package edu.zut.cs.javaee.manager.score.service;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import edu.zut.cs.javaee.manager.base.service.GenericGenerator;

import edu.zut.cs.javaee.manager.score.domain.Score;

public class ScoreEntityGenerator extends GenericGenerator{

	@Autowired
	ScoreManager scoreManager;

	public void setScoreManager(ScoreManager scoreManager) {
		this.scoreManager = scoreManager;
	}
	
	/**
	 * test to build course_name
	 */
	String list[]= {"JavaEE","数据库","Python","客户端技术"};
	@Test 
	public void gen_scorelist() {
		for(int i=1;i<=4;i++) {
			Score score=new Score();
			score.setScore_cname("score_"+i+"_"+list[i-1]);
			this.scoreManager.save(score);
			
		}
	}
}
